package com.oocl.heather.entity;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Customer {

	private int id;
	private String name;
	private Date birth;
	private String sex;
	private String email;
	
	public Customer() {
		super();
	}
	public Customer(int id, String name, Date birth, String sex, String email) {
		super();
		this.id = id;
		this.name = name;
		this.birth = birth;
		this.sex = sex;
		this.email = email;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getBirth() {
		return birth;
	}
	public void setBirth(Date birth) {
		this.birth = birth;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String toString(){
		DateFormat format=new SimpleDateFormat("yyyy-MM-dd");
		String date=format.format(birth);
		return "Customer [id="+id+",name="+name+",birth="+date+",sex="+sex+",email="+email+"]\n";
	}
}
